# -*- coding: utf-8 -*-
"""
SurveyAnalyzer 升级版安装脚本
"""

from setuptools import setup, find_packages
from pathlib import Path

# 读取README文件
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text(encoding='utf-8')

# 读取requirements文件
requirements = []
with open('requirements.txt', 'r', encoding='utf-8') as f:
    for line in f:
        line = line.strip()
        if line and not line.startswith('#'):
            requirements.append(line)

setup(
    name="survey-analyzer",
    version="2.0.0",
    author="SurveyAnalyzer Team",
    author_email="team@surveyanalyzer.com",
    description="基于MCP协议的问卷调查数据分析服务 - 升级版",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/surveyanalyzer/survey-analyzer",
    packages=find_packages(),
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Developers",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Topic :: Scientific/Engineering :: Information Analysis",
        "Topic :: Software Development :: Libraries :: Python Modules",
    ],
    python_requires=">=3.8",
    install_requires=requirements,
    extras_require={
        "dev": [
            "pytest>=7.4.0",
            "pytest-cov>=4.1.0",
            "black>=23.7.0",
            "flake8>=6.0.0",
            "mypy>=1.5.0",
        ],
        "docs": [
            "sphinx>=7.1.0",
            "sphinx-rtd-theme>=1.3.0",
        ],
        "performance": [
            "memory-profiler>=0.61.0",
            "line-profiler>=4.1.0",
        ],
    },
    entry_points={
        "console_scripts": [
            "survey-analyzer=src.main:main",
        ],
    },
    include_package_data=True,
    package_data={
        "src": ["config.yaml"],
    },
    keywords=[
        "survey",
        "data analysis",
        "clustering",
        "statistics",
        "visualization",
        "mcp",
        "machine learning",
        "questionnaire",
    ],
    project_urls={
        "Bug Reports": "https://github.com/surveyanalyzer/survey-analyzer/issues",
        "Source": "https://github.com/surveyanalyzer/survey-analyzer",
        "Documentation": "https://survey-analyzer.readthedocs.io/",
    },
)